﻿
@{
    ViewData["Title"] = "AddReportlossesView";
    Layout = "~/Views/Shared/Template.cshtml";
}

<h4>新增调报损</h4>
<form class="layui-form" action="">

    <div class="layui-form-item" style="margin-left:150px;margin-top:50px">
        <div class="layui-inline">
            <label class="layui-form-label">报损单号:</label>
            <div class="layui-input-inline">
                <input type="text" id="reportlossesNos" name="reportlossesNo" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">报损类型</label>
            <div class="layui-input-inline">
                <select id="reportlossesType" name="reportlossesType" lay-filter="aihao">
                    <option value="">请选择</option>
                    <option value="采购收货入库">采购收货入库</option>
                    <option value="销售退货入库">销售退货入库</option>
                    <option value="生产产品入库">生产产品入库</option>
                    <option value="领用退还入库">领用退还入库</option>
                    <option value="借货入库">借货入库</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">关联订单号</label>
            <div class="layui-input-inline">
                <input type="text" id="associateNumber" name="associateNumber" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item" style="margin-left:140px;margin-top:30px">
        <div class="layui-inline">
            <label class="layui-form-label">制单人</label>
            <div class="layui-input-inline">
                <input type="text" name="singleMaker" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">制单时间</label>
            <div class="layui-input-inline">
                <input type="date" id="makeTime" name="makeTime" autocomplete="off" class="layui-input">
            </div>
        </div>

    </div>
    <div class="layui-form-item layui-form-text" style="margin-left:130px;margin-top:30px">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入内容" id="moveRemark" name="moveRemark" class="layui-textarea"></textarea>
        </div>
    </div>
    <div style="float:left;margin-top:40px;margin-bottom:40px">
        <h4>产品信息</h4>
    </div>
    <div style="float:right;margin-top:40px;margin-bottom:40px">
        <button type="button" class="layui-btn layui-bg-gray" lay-on="test-page-custom">
            <i class="layui-icon layui-icon-add-1"></i>新增产品
        </button>
    </div>
    <table class="layui-hide" id="reportProductList" lay-filter="test"></table>
    <div class="layui-form-item" style="text-align:center;margin-top:50px">
        <button class="layui-btn" lay-submit lay-filter="formSubmit">提交</button>
        <button type="reset" class="layui-btn layui-btn-primary" onclick="location.href='/Warehouse/ReportlossesShow'">取消</button>
    </div>
</form>

<script>


    // // 表单提交事件
    // layui.use(['layer', 'form', 'util', 'table'], function () {
    //     var layer = layui.layer;
    //     var $ = layui.jquery;
    //     var form = layui.form;
    //     var util = layui.util;
    //     var table = layui.table;

    //     form.on('submit(demo2)', function (data) {
    //         var field = data.field;
    //         var checkStatus = table.checkStatus('procurementProduct');
    //         field.storageProducts = checkStatus.data.map(function (item) {
    //             return item;
    //         });
    //         console.log(field);//field.products
    //         // 显示填写结果，仅作演示用
    //         $.ajax({
    //             url: '/Purchase/GetAddProcurements',
    //             type: 'post',
    //             data: {
    //                 field: field,
    //                 token: localStorage.getItem("token"),
    //             },
    //             success: function (res) {
    //                 var res = JSON.parse(res)
    //                 console.log(field);
    //                 console.log(res);
    //                 if (res.code == 0) {
    //                     layer.alert("添加成功");
    //                     //跳转页面
    //                     //location.href = '/Purchase/ProcurementShow'
    //                 } else {
    //                     layer.alert("添加失败");
    //                 }
    //             }
    //         });

    //         return false; // 阻止默认 form 跳转
    //     });
    // });
</script>
<script src="~/js/warehouse/Reportlosses/ReportlossesAdd.js"></script>
